/*
    XTU OJ: 1416
    Link: https://acm.xtu.edu.cn/exam/index.php/problem/exam_read/id/1416
    by: fifth_light
*/

#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

int main(void) {
    int running = 1;
    while (running) {
        int chars[26] = {0};
        while (1) {
            int ch = getchar();
            if (ch >= 'a' && ch <= 'z') {
                chars[ch - 'a']++;
            } else {
                if (ch == -1) {
                    running = 0;
                }
                break;
            }
        }
        int result = 0;
        for (int i = 0; i < 26; i++) {
            if (chars[i] != 0) {
                result++;
            }
        }
        if (result != 0) {
            printf("%d\n", result - 1);
        }
    }
    return 0;
}
